home *** CD-ROM | disk | FTP | other *** search
- function onMetricsLoaded()
- {
- var _loc2_ = g_path.lastIndexOf("/",g_path.length);
- var _loc3_ = g_path.substring(0,_loc2_);
- g_path = _loc3_;
- var _loc6_ = g_path.lastIndexOf("/",g_path.length);
- var _loc4_ = g_path.substring(_loc6_ + 1,_loc2_);
- _loc2_ = _loc6_;
- _loc3_ = g_path.substring(0,_loc2_);
- g_path = _loc3_;
- _loc6_ = g_path.lastIndexOf("/",g_path.length);
- var _loc5_ = g_path.substring(_loc6_ + 1,_loc2_);
- messageString = _loc5_ + "_" + _loc4_ + "_";
- switch(productionGame)
- {
- case 1:
- _metrics.account = "carnetnmcom";
- break;
- case 2:
- _metrics.account = "carnetnmdev";
- omnitureGraphic._x = 0;
- omnitureGraphic._y = 0;
- break;
- default:
- _metrics.account = "carnetnmdev";
- }
- _metrics.nameSpace = "cartoonnetworknewmedia";
- _metrics.CName = "stats.cartoonnetwork.com";
- _metrics.pageURL = "http://www.cartoonnetwork.com/video/gen/test.html";
- _metrics.clickMapSupport = true;
- _metrics.movieID = _loc4_;
- _metrics.clickMapPage = "My Page Name";
- _metrics.testSupport = true;
- _metrics.debugActive = true;
- _metrics.autoTrack = false;
- _metrics.analyticsDelay = true;
- _metrics.delayControl = 2;
- if(productionGame)
- {
- _metrics.sendLink("Games",{objectid:this,channel:"Games",prop4:messageString + "play"});
- }
- trace("Metrics Loaded");
- }
- var g_path;
- var messageString = "";
- var connection = new LocalConnection();
- var productionGame = 0;
- var asMetricsString = "as_metrics.swf";
- g_path = this._url;
- trace("g_path: " + g_path);
- if(g_path.lastIndexOf("www.cartoonnetwork",g_path.length))
- {
- if(g_path.lastIndexOf("cartoonnetwork.com/",g_path.length))
- {
- productionGame = 1;
- }
- }
- if(g_path.lastIndexOf(".turner.com",g_path.length) >= 0 || g_path.lastIndexOf("http:",g_path.length) == -1)
- {
- productionGame = 2;
- }
- if(productionGame == 1 || g_path.lastIndexOf(".turner.com",g_path.length) >= 0)
- {
- trace("productionGame: " + productionGame + ", " + g_path.lastIndexOf(".turner.com",g_path.length));
- asMetricsString = "/tools/media/as_metrics.swf";
- }
- _metrics.addEventListener("loaded",this,"onMetricsLoaded");
- _metrics.loadEvents(asMetricsString);
- connection.sendTracking = function(param1, param2, param3)
- {
- var _loc2_ = messageString + param1;
- trace("Trk_Received: " + _loc2_);
- if(productionGame)
- {
- _metrics.sendLink("Games",{objectid:this,channel:"Games",prop4:_loc2_});
- }
- };
- connection.testConnection = function()
- {
- trace("### Test_Received ###");
- };
- connection.connect("trkConnection");
- trace(" -- Tracker Loaded -- ");
- stop();
-